﻿using System;
using Besture.Bll;
using Besture.Common;
using Besture.Utils;

namespace Besture.UI.Admin.Sys
{
    public partial class WebSet : BasePage
    {

        #region 页面加载事件

        /// <summary>
        /// 页面加载
        /// </summary>
        protected override void InitialLoad()
        {
            InitData();
        }

        /// <summary>
        /// 回发
        /// </summary>
        protected override void PostBackLoad()
        {
           
        }

        /// <summary>
        /// 数据加载
        /// </summary>
        protected void InitData()
        {
            ShortContentDac shortContentDac = new ShortContentDac();
            txtWebUrl.Text = shortContentDac.GetContent("WebUrl").EntryValue;
            txtTell.Text = shortContentDac.GetContent("Tell").EntryValue;
            txtQQ1.Text = shortContentDac.GetContent("QQ1").EntryValue;
            txtQQ2.Text = shortContentDac.GetContent("QQ2").EntryValue;
            txtQQ3.Text = shortContentDac.GetContent("QQ3").EntryValue;

        }
        #endregion

        #region 保存

        protected void btnSubmit_Click(object sender, EventArgs eventArgs)
        {
            ShortContentDac shortContentDac = new ShortContentDac();
            shortContentDac.SetContent("WebUrl", txtWebUrl.Text);
            shortContentDac.SetContent("Tell", txtTell.Text);
            shortContentDac.SetContent("QQ1", txtQQ1.Text);
            shortContentDac.SetContent("QQ2", txtQQ2.Text);
            shortContentDac.SetContent("QQ3", txtQQ3.Text);
            Fun.Alert("保存成功", "WebSet.aspx");
        }
        #endregion
    }
}